package com.cm.figure.service.userService;

import com.cm.figure.dao.UserMapper;
import com.cm.figure.model.User;
import com.cm.figure.utility.MD5;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * ClassName:LoginServiceImp
 * Package:com.cm.figure.service.userService
 * Description:
 *
 * @Date:2021/8/14 22:16
 * @com.chuangmei
 */
@Service
public class LoginServiceImp implements LoginService {

    // dao
    @Resource
    private UserMapper userDao;

    @Override
    public User login(String username, String password) {

        return userDao.selectUserByUsernameAndPassword(username, MD5.getMD5(password));
    }
}
